﻿using ExpressesClass.BestApi.Utils;
using ExpressesClass.DepponApi.Base;
using ExpressesClass.DepponApi.billApplyNotify.response;
using ExpressesClass.DepponApi.Util;
using System;

namespace ExpressesClass.DepponApi.billApplyNotify.request
{
    public class BillApplyNotifyReq : DepponRequest
    {
        public BillApplyNotifyReq()
        {
            this.logisticID = "";
            this.custOrderNo = "";
            this.mailNo = "";
            this.needTraceInfo = "";
            this.companyCode = "";
            this.orderType = "";
            this.transportType = "";
            this.customerCode = "";
            this.gmtCommit = "";
            this.payType = "";
            sender = new Person();
            receiver = new Person();
            packageInfo = new PackageInfo();
            addServices = new AddServices();
        }

        public String logisticID { get; set; }
        public String custOrderNo { get; set; }
        public String mailNo { get; set; }
        public String needTraceInfo { get; set; }
        public String companyCode { get; set; }
        public String orderType { get; set; }
        public String transportType { get; set; } // 微小件特惠：WXJTH; 经济大件：JJDJ; PACKAGE:标准快递; RCP:360特惠件; EPEP:电商尊享; DEAP：特准快件 ； ZBRH: 3.60特重件; NZBRH : 重包入户；ZBTH:重包特惠； 同城件：CITYPIECE
        public String customerCode { get; set; } //下单模式为2时必填 德邦一线营业部给到客户的月结客户编码 ，是一串数字，由营业部给出。沙箱环境需要下子母件订单必须传值 219401 或者219402
        public String gmtCommit { get; set; }
        public String payType { get; set; } // 	0:发货人付款（现付） 1:收货人付款（到付） 2：发货人付款（月结） （电子运单客户不支持寄付）
        public Person sender { get; set; }
        public Person receiver { get; set; }
        public PackageInfo packageInfo { get; set; }
        public AddServices addServices { get; set; }

        public override string GetUrl()
        {
            return ConfigUrl.GetUrl("CREATE");
        }

        public override DepponResponse makeResponse(string rsp)
        {
            return JsonParser.jsonToObj<BillApplyNotifyRsp>(rsp);
        }
    }
}
